\documentclass[tikz,border=2pt]{standalone}

\usepackage{tikz}
\usepackage{pgfmath}

% Inverse hyperbolic tangent for PGF math:
% atanh(B) = 1/2 ln[(1+B)/(1-B)]
\pgfmathdeclarefunction{atanh}{1}{%
  \pgfmathparse{0.5*ln((1+#1)/(1-#1))}%
}

\begin{document}
\begin{tikzpicture}[scale=2.5,>=latex]

    % --------------------------------------------------
    % Axes: atanh(B) vs B
    % --------------------------------------------------
    \draw[->, very thick] (0,0) -- (1.2,0)
      node[right,font=\footnotesize] {$B$};
    \draw[->, very thick] (0,0) -- (0,2)
      node[above,font=\footnotesize] {$\tanh^{-1}(B)$};

    % --------------------------------------------------
    % Rectangle 1 (blue): interval (B0, B1)
    % The area represents the entropy production (in units of k_B)
    % for a given cycle width ΔB = B1 - B0.
    % --------------------------------------------------
    \def\Bzero{0.1}
    \def\Bone{0.4}

    % Marks and labels on the B-axis
    \draw[very thick] (\Bzero, 0.02) -- (\Bzero, -0.02);
    \draw[very thick] (\Bone, 0.02) -- (\Bone, -0.02);
    \node[font=\footnotesize, anchor=base] at (\Bzero, -0.12) {$B_0$};
    \node[font=\footnotesize, anchor=base] at (\Bone, -0.12) {$B_1$};

    % Dotted guides defining the rectangle bounds
    \draw[dotted, ultra thick] (\Bzero, 0) -- (\Bzero, {atanh(\Bzero)});
    \draw[dotted, ultra thick] (\Bone, 0) -- (\Bone, {atanh(\Bzero)});

    % Filled rectangle between atanh(B0) and atanh(B1)
    \draw[very thick, blue, fill=blue!20, fill opacity=0.6]
      ({\Bzero}, {atanh(\Bzero)}) --
      ({\Bone}, {atanh(\Bzero)}) --
      ({\Bone}, {atanh(\Bone)}) --
      ({\Bzero}, {atanh(\Bone)}) -- cycle;

    % --------------------------------------------------
    % Rectangle 2 (red): shifted interval (B0', B1')
    % Same width ΔB, but closer to B = 1, illustrating
    % larger entropy production as the interval shifts right.
    % --------------------------------------------------
    \def\Bzeroprima{0.6}
    \def\Boneprima{0.9}

    % Marks and labels on the B-axis
    \draw[very thick] (\Bzeroprima, 0.02) -- (\Bzeroprima, -0.02);
    \draw[very thick] (\Boneprima, 0.02) -- (\Boneprima, -0.02);
    \node[font=\footnotesize, anchor=base] at (\Bzeroprima, -0.12) {$B_0'$};
    \node[font=\footnotesize, anchor=base] at (\Boneprima, -0.12) {$B_1'$};

    % Dotted guides defining the rectangle bounds
    \draw[dotted, ultra thick] (\Bzeroprima, 0) -- (\Bzeroprima, {atanh(\Bzeroprima)});
    \draw[dotted, ultra thick] (\Boneprima, 0) -- (\Boneprima, {atanh(\Bzeroprima)});

    % Filled rectangle between atanh(B0') and atanh(B1')
    \draw[very thick, red, fill=red!20, fill opacity=0.6]
      ({\Bzeroprima}, {atanh(\Bzeroprima)}) --
      ({\Boneprima}, {atanh(\Bzeroprima)}) --
      ({\Boneprima}, {atanh(\Boneprima)}) --
      ({\Bzeroprima}, {atanh(\Boneprima)}) -- cycle;

    % --------------------------------------------------
    % atanh(B) curve (diverges as B -> 1)
    % --------------------------------------------------
    \draw[black, very thick, domain=0:0.964, samples=200]
      plot ({\x}, {atanh(\x)});

    % --------------------------------------------------
    % Visual reference for B = 1 (vertical asymptote)
    % --------------------------------------------------
    \draw[dash pattern=on 3pt off 3pt, ultra thick] (1,0) -- (1,2);
    \node[font=\footnotesize, anchor=base] at (1,-0.12) {$1$};

\end{tikzpicture}
\end{document}
